
//  Copyright (C) 2011 Luca Piccioni
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System.IO;

namespace Derm.Scene.Mesh
{
	/// <summary>
	/// Interface implemented by external plugins loaded by <see cref="MeshCodec"/>.
	/// </summary>
	public interface IMeshCodecPlugin : IPlugin
	{
		#region Codec Implementation

		/// <summary>
		/// Determine whether a mesh file is supported by this plugin.
		/// </summary>
		/// <param name="path"></param>
		/// <returns></returns>
		bool IsSupported(string path);

		/// <summary>
		/// Load image from file.
		/// </summary>
		/// <param name="fs">
		/// A <see cref="FileStream"/> where the image data is stored.
		/// </param>
		/// <returns>
		/// An <see cref="Mesh"/> holding the image data.
		/// </returns>
		Mesh Load(Stream fs);

		#endregion
	}
}
